//
//  TSMessage+YTX.m
//  p4
//
//  Created by yang xincheng on 15/3/19.
//  Copyright (c) 2015年 com.baidao. All rights reserved.
//

#import "TSMessage+YTX.h"
#import <TSMessage.h>

@implementation TSMessage (YTX)

+ (void)initialize
{
    [self addCustomDesignFromFileWithName:@"tsmessage.json"];
}

+ (void)ytx_showNotificationInViewController:(UIViewController *)viewController
                                   title:(NSString *)title
                                    type:(TSMessageNotificationType)type
{
    //暂时这样处理
    [self showNotificationInViewController:(viewController.navigationController ?: viewController) ?: [self defaultViewController]
                                     title:title
                                  subtitle:nil
                                     image:nil
                                      type:type
                                  duration:2.f
                                  callback:nil
                               buttonTitle:nil
                            buttonCallback:nil
                                atPosition:TSMessageNotificationPositionTop
                      canBeDismissedByUser:YES];
}

@end
